﻿<%@ Page Title="Display Button Bar" Language="C#" MasterPageFile="~/Demo.master"
    Inherits="DemoPage" %>

<%@ Register Src="~/CodeFormatter.ascx" TagName="Code" TagPrefix="demo" %>

<script runat="server">
    protected void OnUpdate(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(txtCloseButtonText.Text))
            SampleDatePicker.CloseButtonText = txtCloseButtonText.Text;

        if (!string.IsNullOrEmpty(txtTextForToday.Text))
            SampleDatePicker.TextForToday = txtTextForToday.Text;
    }
</script>

<asp:Content ID="Content1" ContentPlaceHolderID="DemoHolder" runat="Server">
    <div class="dna-state-help ui-corner-all" style="margin-bottom: 10px;">
        Display a button for selecting Today's date and a Done button for closing the calendar
        with the <b>ShowButtonPanel</b> property. Each button is enabled by default when
        the bar is displayed, but can be turned off with additional options. Button text
        is customizable.
    </div>
    <br />
    <DotNetAge:DatePicker ID="SampleDatePicker" runat="server" ShowButtonPanel="true" />
    <br />
    <br />
    <div style="position: absolute; float: left; left: 0px;">
        <div class="dna-demo-fields">
            <ul>
                <li><span>CloseButtonText</span><asp:TextBox ID="txtCloseButtonText" runat="server"
                    Text="Done"></asp:TextBox></li>
                <li><span>TextForToday</span><asp:TextBox ID="txtTextForToday" runat="server" Text="Today"></asp:TextBox></li>
                <li>
                    <asp:Button ID="Button1" runat="server" Text="Update" OnClick="OnUpdate" /></li>
            </ul>
        </div>
        <br />
        <demo:Code runat="server" ID="codeView" SourceFile="~/DatePicker/Codes/DisplayButtonBar.aspx" />
</asp:Content>
